home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / compress / clscmp11.zip / COMPRESS.DOC < prev    next >
Text File  |  1993-07-26  |  8KB  |  235 lines

  1.  
  2.                  DATA COMPRESSION LIBRARY v1.10
  3.                          by Matt Witzman
  4.      
  5.              Copyright (C) Cedar Lake Software 1993
  6.  
  7.  
  8. INTRODUCTION
  9. ------------
  10.  
  11. This data compression library uses a string recognition algorithm
  12. to compress data (modified Lempel-Ziv-Welch).  This library was
  13. deigned for developing game software, however it could be used for
  14. other purposes as well.  Files can be compressed with 11, 12, 13,
  15. or 14 bit table sizes and a variable size data buffer.  This version now 
  16. includes run length encoding (RLE) for compressing bitmaps with 
  17. lots of blank space.  This method is much faster than the LZW 
  18. compression, but it won't compress nearly as small.
  19.  
  20. This library contains two sets of object files compiled under
  21. Borland C v3.1.  One set is geared towards disk I/O and the other
  22. is set up for uncompressing data from files to memory.
  23.  
  24.  
  25.  
  26. WARRANTY
  27. --------
  28.  
  29. CEDAR LAKE SOFTWARE hereby disclaims all warranties relating to
  30. this software, whether express or implied, including without
  31. limitation any implied warranties of merchantability or fitness for
  32. a particular purpose.  CEDAR LAKE SOFTWARE will not be liable for
  33. any special, incidental, consequential, indirect, or similar
  34. damages due to loss of data or any other reason, even if CEDAR LAKE
  35. SOFTWARE has been advised of the possibility of such damages. 
  36. CEDAR LAKE SOFTWARE's liability for any damages shall never exceed
  37. the price paid for the license to use this software, regardless of
  38. the form of the claim.  The person using this software bears all
  39. risk as to the quality and performance of this software.
  40.  
  41.  
  42. SHAREWARE
  43. ---------
  44.  
  45. This program is distributed as "SHAREWARE".   This program is
  46. distributed at no charge for evaluation purposes ONLY.  You may
  47. share this software with anyone you choose so long as the program
  48. is distributed in its original form with all files intact.  If you
  49. continue to use this software after 10 days of its original use you
  50. MUST make a registration payment of $22.95 per installation to the
  51. author or the license to use this software is revoked.
  52.  
  53.  
  54. LICENSE
  55. -------
  56.  
  57. This program is not crippled in any way.  If you use this library
  58. for developing your own software for resale you are only obligated
  59. to pay the single registration fee, however we request that you
  60. notify Cedar Lake Software about the product prior to release and
  61. send us a copy of your product to verify product registration.
  62.  
  63.  
  64. FILES
  65. -----
  66.  
  67.      c3filec.obj     LZW File compression/decompression - Compact Model
  68.      c3filel.obj     LZW File compression/decompression - Large Model
  69.      c3fileh.obj     LZW File compression/decompression - Huge Model
  70.  
  71.      c3memc.obj      LZW Memory Decompression - Compact Model
  72.      c3meml.obj      LZW Memory Decompression - Large Model
  73.      c3memh.obj      LZW Memory Decompression - Huge Model
  74.  
  75.      c1filec.obj     RLE File compression/decompression - Compact Model
  76.      c1filel.obj     RLE File compression/decompression - Large Model
  77.      c1fileh.obj     RLE File compression/decompression - Huge Model
  78.  
  79.      c1memc.obj      RLE Memory Decompression - Compact Model
  80.      c1meml.obj      RLE Memory Decompression - Large Model
  81.      c1memh.obj      RLE Memory Decompression - Huge Model
  82.  
  83.      compress.doc    This file
  84.  
  85.      c3file.h        LZW Prototypes for file compression/decompression
  86.      c3mem.h         LZW Prototypes for memory decompression
  87.      c1file.h         RLE Prototypes for file compression/decompression
  88.      c1mem.h         RLE Prototypes for memory decompression
  89.  
  90.      colorbar.dat    Color bars VGA data file
  91.      colorbar.cl3    LZW Compressed color bar file
  92.      colorbar.cl1    RLE Compressed color bar file
  93.  
  94.      filedemo.c      Demonstrates file compression/decompression
  95.      memdemo.c       Demonstrates file decompression to memory
  96.  
  97.  
  98. COMPILING
  99. ---------
  100.  
  101.      Both versions of the object files can not be linked into the
  102. same program because conflicts will occur.  When compiling make
  103. sure the correct object file is used to match you memory model.
  104.  
  105. Example command lines:
  106.  
  107.      bcc -ml test.c c3filel.obj
  108.      bcc -mc test2.c c1memc.obj
  109.  
  110. C1FILE?.OBJ
  111. -----------
  112.  
  113. unsigned CLSC1_Compress ( char *source, char *dest );
  114.  
  115.      char *source    Pathname of source file
  116.      char *dest        Pathname of destination file
  117.  
  118.    RETURN VALUES  0=Success  1=Error Occured
  119.  
  120. unsigned CLSC1_Decompress ( char *source, char *dest );
  121.  
  122.      char *source    Pathname of source file
  123.      char *dest        Pathname of destination file
  124.  
  125.    RETURN VALUES  0=Success  1=Error Occured
  126.  
  127. C1MEM?.OBJ
  128. ----------
  129.  
  130. unsigned CLSC1_Memdecompress ( char *source, unsigned char far *dest );
  131.  
  132.      char *source        Pathname of source file
  133.      unsigned char far *dest    Far pointer to destination ( MAX 1 SEGMENT )
  134.                                 == 64k
  135.  
  136.    RETURN VALUES   0=Success  1=Error Occured
  137.  
  138.  
  139.  
  140. C3FILE?.OBJ
  141. -----------
  142.  
  143. unsigned CLS_Compress ( char *sourcefile, char *destfile, unsigned
  144.           char bitsize, unsigned readbuffer );
  145.  
  146.      char *sourcefile       Pathname of source file
  147.      char *destfile         Pathname of destination file
  148.      unsigned char bitsize  This must be between 11 and 14.  Higher
  149.                             values will give better compression but
  150.                             chew up more memory.
  151.      unsigned readbuffer    Size of read buffer.  ( 4000-65500 )
  152.                             The bigger the better.
  153.  
  154.      RETURN VALUES   0= no errors  1=error occured
  155.  
  156. unsigned CLS_Decompress ( char *sourcefile, char *destfile );
  157.  
  158.      char *sourcefile       Pathname of source file
  159.      char *destfile         Pathname of destination file
  160.  
  161.      RETURN VALUES   0= no errors  1=error occured
  162.  
  163. unsigned long CLS_GetSize ( char *sourcefile );
  164.  
  165.      char *sourcefile       Path of source file
  166.      RETURNS LENGTH OF COMPRESSED FILE FOR ALLOCATING ARRAYS
  167.  
  168.  
  169. C3MEM?.OBJ
  170. ----------
  171.  
  172. unsigned CLS_MemDecompress ( char *sourcefile, char far *dest );
  173.  
  174.      char *sourcefile       Path of source file
  175.  
  176.      char far *dest         Destination array.  Single segment   
  177.                             allows 64k of decompression even in
  178.                             huge model.
  179.      RETURN VALUES   0= success    1=error
  180.  
  181. unsigned long CLS_GetSize ( char *sourcefile );
  182.  
  183.      char *sourcefile       Path of source file
  184.  
  185.      RETURNS LENGTH OF COMPRESSED FILE FOR ALLOCATING ARRAYS
  186.  
  187.  
  188. MEMORY REQUIREMENTS
  189. -------------------
  190.  
  191.    LZW Compression:
  192.     Compression chews up a lot more memory than decompression.
  193.     Heres the formulas:
  194.  
  195.      Compression Memory= 9*(1<<bitsize)+readbuffer bytes
  196.           eg. 14 bit, 64000 byte buffer = 211456 bytes of memory
  197.  
  198.      Decompression Memory= 4*(1<<bitsize)
  199.           eg 14 bit = 65536 bytes.
  200.  
  201.     RLE Compression:
  202.     
  203.      Compression Allocates 8512 bytes for buffers.
  204.  
  205.      Decompression is stream based, so extra memory will only be
  206.      required when uncompressing to memory locations.
  207.  
  208. REGISTRATION INFORMATION
  209. ------------------------
  210.  
  211. This program may be registered by sending a check or money order
  212. for $22.95 to:
  213.  
  214.      Cedar Lake Software
  215.      PO BOX 201103
  216.      Bloomington, MN,  55420-1103
  217.  
  218. Full source code will be sent for an additional $44.95.
  219.  
  220. PLEASE USE REGISTRATION FORM!
  221.  
  222. Once you are registered you will be notified when future versions
  223. are released.  I plan to add a few more compression methods in the
  224. near future plus I am open to suggestions for new features.   New
  225. versions can be sent to registered users for $5 to cover shipping
  226. and handling or obtained from a BBS.  
  227.  
  228.  
  229.  
  230.  
  231. Questions and comments may also be sent to the same address.  I may
  232. also be reached at the following internet addresses:
  233.  
  234.      witz0004@student.tc.umn.edu
  235.      matt.witzman@f115.n282.z1.tdkt.kksys.com